package test13;

public class NewPyramid {
    public NewPyramid(int pyramid) {
        this.pyramid = pyramid;
    }
    public NewPyramid(){}

    public int getPyramid() {
        return pyramid;
    }

    public void setPyramid(int pyramid) {
        this.pyramid = pyramid;
    }

    public void createPyramid(){
        int i,j,k,n;
        n = pyramid;
        for(i=1;i<=n;i++){
            for(k=1;k<=n-i;k++){
                System.out.print(" ");
            }
            for(j=1;j<=i;j++){
                System.out.print(j);
            }
            for(k=i-1;k>0;k--){
                System.out.print(k);
            }
            System.out.println();
        }
    }


    private int pyramid;



}
